﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<B10.Models.UserProfile>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
    <%= Html.Telerik().StyleSheetRegistrar()
        .DefaultGroup(group => group.Add("telerik.common.css")
                                    .Add("telerik.sitefinity.css"))
    %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="ui-corner-all ui-helper-clearfix alternate-header" id="tabs">
        <div class="ui-widget-header-title">
            Autorzy
        </div>
    </div>
    <div>
        <% Html.Telerik().Grid<B10.Models.UserProfile>()
        .Name("authors")
        .Localizable("pl-PL")
        .DataBinding(binding => binding.Ajax().Select("_AuthorsList", "Authors"))
        .Columns(columns =>
        {
            columns.Bound(c => c.Avatar).ClientTemplate(
                "<a href='"
                + Url.Action("Index", "PublicProfile", new { name = "<#=DisplayName#>", id = "<#=Id#>" })
                + "' title='" + "<#=DisplayName#>" + "'>"
                + "<img alt='' style=\"max-width: 64px; max-height: 64px;\" src='"
                + Html.AttributeEncode("<#=Avatar#>") + "' /></a>")
                .Filterable(false).Sortable(false).Width(70);
            columns.Bound(c => c.UserName).ClientTemplate(
                "<a href='"
                + Url.Action("Index", "PublicProfile", new { name = "<#=DisplayName#>", id = "<#=Id#>" })
                + "' title='" + "<#=DisplayName#>" + "'>"
                + "<#=DisplayName#>" + "</a>"
                );

        })
        .Pageable(p => p.PageSize(30))
        .Sortable()
        .Filterable()
        .Render();
        %>
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="LeftColumnContent" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="RightColumnContent" runat="server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="RightColumnBottomContent" runat="server">
    <%= Html.Telerik().ScriptRegistrar().jQuery(false) %>
</asp:Content>
